<html>

<head>
  <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
  <div id="app">
  </div>
  <script>
    const {
      defineComponent,
      createApp,
    } = Vue;

    const component = defineComponent({
      data: () => ({
        count: 0
      }),
      methods: {
        addOne() {
          this.count += 1;
        },
      },
      template: `
        <h1>
          This is a Vue 3 Root Element!
        </h1>
        <button @click="addOne">
          Pressed {{ count }} times.
        </button>
      `
    });

    createApp(component)
      .mount('#app');
  </script>
</body>

</html>
